Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The included wrapper script to launch proton mail fails on wayland due to the if condition on line 70 checking for a non existent file in the $XDG_RUNTIME_DIR. Fixing that condition does minimally resolve the issue.
However, completely removing the script in favor of a single env var is far simpler. Proton Mail Beta's asar'd package.json includes '"electron": "29.0.1"'. Since Electron 28.x.x, wayland support can be enabled via the ELECTRON_OZONE_PLATFORM_HINT env var.
https://releases.electronjs.org/release/v28.0.0
https://www.electronjs.org/docs/latest/api/environment-variables#electron_ozone_platform_hint-linux
Although Element is a noteworthy electron app example, its configuration is far older and carries fixes related to old electron versions. Any past conflicts with specific users' graphics drivers are likely not relevant anymore.
flathub/im.riot.Riot#452 (comment)
Script source for Element on electron 13: flathub/im.riot.Riot@2b9214a